import request from '@/utils/request'

// 查询持仓记录列表
export function listStockhold(query) {
  return request({
    url: '/stock/stockhold/list',
    method: 'get',
    params: query
  })
}

// 查询持仓记录详细
export function getStockhold(id) {
  return request({
    url: '/stock/stockhold/' + id,
    method: 'get'
  })
}

// 新增持仓记录

export function addStockhold(data) {
  return request({
    url: '/stock/stockhold',
    method: 'post',
    data: data
  })
}

// 修改持仓记录

export function updateStockhold(data) {
  return request({
    url: '/stock/stockhold',
    method: 'put',
    data: data
  })
}

// 删除持仓记录

export function delStockhold(id) {
  return request({
    url: '/stock/stockhold/' + id,
    method: 'delete'
  })
}
